-- card: 3055 from stack: in.1 (US) -- bmap block id: 3273 -- flags: 0000 -- background id: 2661 -- name: -- part 1 (field) -- low flags: 01 -- high flags: 0007 -- rect: left=69 top=68 right=252 bottom=434 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 9 -- style flags: 0 -- line height: 12 -- part name: -- part 5 (button) -- low flags: 00 -- high flags: A003 -- rect: left=178 top=279 right=309 bottom=347 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: CreateStack ----- HyperTalk script ----- on mouseUp ask "Stack name :" if it ≠ empty then put it into SName createStack SName get the Result if first word of it = "Error" then answer it else if it is empty then go stack SName else go stack it end if end if end mouseUp -- part contents for card part 1 ----- text ----- CreateStack 1.1 by Frédéric RINALDI DESCRIPTION CreateStack is a XCMD that allows to create a new Stack from within a script, without user intervention. SYNTAX CreateStack PARAMETERS If you supply only a name, the stack will be created at HyperCard's hierarchical level on the disk. Help online is available : if you pass as first parameter : "!" : the Result returns the version info "?": the Result returns the syntax USING If no error occured, the Result will be empty. Otherwise, it can contain : "Error : Bad Parameter Number" "Error : Resource STDT not found" "Error : Bad File Name" "Error : Path Not Found" "Error : Volume Not Found" "Error : Creation aborted" "Error : Create Failed" "Error : FSDelete failed" "Error : FSOpen failed" "Error : FSWrite failed" "Error : FSClose failed" If a file with the same name already exists, the XCMD will ask if you want to replace it, or rename the stack to be created. If you choose to rename it, the the Result will return the created stack name. This XCMD needs an auxillary resource STDT named "CreateStack". You can renumber it, but avoid renaming it ! -------------------------------------------------------------------- This (these) external(s) is (are) FreeWare,allowing unlimited use in any non-commercial stack. You just need in this case to mention the author's name and copyright in your stack. Any commercial use must be licensed and aknowledged by the author. © F. Rinaldi - 1989,1990 AppleLink: RINALDI1 CalvaCom : FR10 Compuserve : 71170,2111